package pwd.allen;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * spring读取的basePackages是MyComponentScan指定的
 *
 * @see ConfigurationClassParser#doProcessConfigurationClass
 *
 * @author 门那粒沙
 * @create 2022-02-20 18:10
 **/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@ComponentScan(useDefaultFilters = false, basePackages = "spring.component.scan")
public @interface MyComponentScan {

    @AliasFor("basePackages")
    String[] value() default {};

    @AliasFor("value")
    String[] basePackages() default {};
}
